package cn.iocoder.yudao.module.handguard.dal.mysql.userbasetable6;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.handguard.dal.dataobject.userbasetable6.UserBaseTable6DO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.handguard.controller.app.userbasetable6.vo.*;

/**
 * 企业贴息贷款 Mapper
 *
 * @author 芋道源码
 */
@Mapper
public interface UserBaseTable6Mapper extends BaseMapperX<UserBaseTable6DO> {

    default PageResult<UserBaseTable6DO> selectPage(UserBaseTable6PageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<UserBaseTable6DO>()
                .eqIfPresent(UserBaseTable6DO::getUserId, reqVO.getUserId())
                .eqIfPresent(UserBaseTable6DO::getIsHouse, reqVO.getIsHouse())
                .eqIfPresent(UserBaseTable6DO::getConditions, reqVO.getCondition())
                .eqIfPresent(UserBaseTable6DO::getNatureOfUnit, reqVO.getNatureOfUnit())
                .eqIfPresent(UserBaseTable6DO::getJob, reqVO.getJob())
                .betweenIfPresent(UserBaseTable6DO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(UserBaseTable6DO::getId));
    }

    default List<UserBaseTable6DO> selectList(UserBaseTable6ExportReqVO reqVO) {
        return selectList(new LambdaQueryWrapperX<UserBaseTable6DO>()
                .eqIfPresent(UserBaseTable6DO::getUserId, reqVO.getUserId())
                .eqIfPresent(UserBaseTable6DO::getIsHouse, reqVO.getIsHouse())
                .eqIfPresent(UserBaseTable6DO::getConditions, reqVO.getCondition())
                .eqIfPresent(UserBaseTable6DO::getNatureOfUnit, reqVO.getNatureOfUnit())
                .eqIfPresent(UserBaseTable6DO::getJob, reqVO.getJob())
                .betweenIfPresent(UserBaseTable6DO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(UserBaseTable6DO::getId));
    }

}
